package com.example.tool.enums;

import com.example.tool.R.R;

public enum ExceptionCode {
    //系统异常区段
    SYSTEM_ERR("系统异常", 3000),
    DICT_ERR("字典异常", 3050),
    DICT_TYPE_AND_NAME_IS_EXIST("该类型字典的名称已经存在", 3051),
    DICT_IS_NOT_EXIST("该字典数据不存在", 3052),
    ;

    private final String message;
    private final Integer code;

    ExceptionCode(String message, Integer code) {
        this.message = message;
        this.code = code;
    }
    public R result(){
        return R.fail(this.message,this.code);
    }


}
